import java.util.Scanner;


public class Main {
    //扑克牌大小
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        String[] cards = str.split("-");
        String[] card1 = cards[0].split(" ");
        String[] card2 = cards[1].split(" ");
        String s = "34567891JQKA2";
        //先判断是否有大小王
        if(cards[0].contains("joker") || cards[1].contains("joker")){
            System.out.println("joker JOKER");
        }else if(card1.length == card2.length){//再比较牌数是否相同
            if(s.indexOf(card1[0].substring(0,1)) > 
                s.indexOf(card2[0].substring(0,1))){
                System.out.println((cards[0]));
            }else{
                System.out.println(cards[1]);
            }
        }else if(card1.length == 4){//再判断是否有炸弹
            System.out.println(cards[0]);
        }else if(card2.length == 4){
            System.out.println(cards[1]);
        }else{
            System.out.println("ERROR");
        }
    }
    //杨辉三角的变形 根据题目模拟（当数据量较大时不通过）
    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] arr = new int[n][n];
        arr[0][n-1] = 1;
        for(int i = 1; i < n; i++){
            arr[i][n-i-1] = 1;
            for(int j = n - i; j < n; j++){
                if(j == n-1){
                    arr[i][j] = arr[i-1][j-1]*2 + arr[i-1][j];
                }else{
                    arr[i][j] = arr[i-1][j-1] + arr[i-1][j] + arr[i-1][j+1];
                }
            }

        }
        int ret = -1;
        for(int i = 0; i < n; i++){
            if(arr[n-1][i] % 2 == 0){
                ret = i + 1;
                break;
            }
        }
        System.out.println(ret);
    }
    //杨辉三角的变形 找规律 可全部通过
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int ret = 0;
        if(n == 1 || n == 2){
            ret = -1;
        }else if(n % 4 == 1 || n % 4 == 3){
            ret = 2;
        }else if(n % 4 == 0){
            ret = 3;
        }else{
            ret = 4;
        }
        System.out.println(ret);
    }
    //年终奖
    public int getMost(int[][] board) {
        // write code here
        int m = board.length;
        int n = board[0].length;
        int[][] dp = new int[m+1][n+1];
        for(int i = 1; i <= m; i++){
            for(int j = 1; j <= n; j++){
                dp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]) + board[i-1][j-1];
            }
        }
        return dp[m][n];
    }
}